package org.hales.commonEnum;

/**
 * @author 陈建康
 */
public enum ResponseCode {
        SUCCESS(0, "成功"),
        ERROR(1, "错误"),
        UNKNOWN_ERROR(10, "未知错误"),
        NEED_LOGIN(20, "需要登录"),
        PERMISSION_DENIED(30, "权限不足"),
        ILLEGAL_ARGUMENT(40, "参数错误"),
        TOKEN_ERROR(50, "token验证失败");
        private final int code;
        private final String desc;

        ResponseCode(int code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        public int getCode() {
            return code;
        }

        public String getDesc() {
            return desc;
        }
}
